package com.lvmama.dest.schedule.tasks.demo;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

import com.taobao.pamirs.schedule.IScheduleTaskDealSingle;
import com.taobao.pamirs.schedule.TaskItemDefine;

@Component
public class TestscheduleBean implements IScheduleTaskDealSingle<String>{

	private final Logger logger = Logger.getLogger(this.getClass());
	
	@Override
	public Comparator<String> getComparator() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<String> selectTasks(String arg0, String arg1, int arg2, List<TaskItemDefine> arg3, int arg4)
			throws Exception {
		List<String> result = new ArrayList<String>();
		result.add("test");
		return result;
	}

	@Override
	public boolean execute(String arg0, String arg1) throws Exception {
		
		for(int i=1;i<=20;i++){
			logger.info("第"+i+"个输出");
			Thread.sleep(1500);
		}
		return true;
	}

}
